 function simpleAmountToChinese(amount) {
    const digits = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
    const units = ['', '拾', '佰', '仟', '万', '拾', '佰', '仟', '亿'];
    
    const [integer, decimal] = Math.abs(amount).toFixed(2).split('.');
    let result = amount < 0 ? '负' : '';
    
    // 转换整数部分
    if (integer === '0') {
      result += '零';
    } else {
      for (let i = 0; i < integer.length; i++) {
        const digit = parseInt(integer[i]);
        const unit = units[integer.length - i - 1];
        
        if (digit !== 0) {
          result += digits[digit] + unit;
        } else if (result.slice(-1) !== '零') {
          result += '零';
        }
      }
      result = result.replace(/零+$/, '').replace(/零+/g, '零');
    }
    
    result += '元';
    
    // 转换小数部分
    const jiao = parseInt(decimal[0]);
    const fen = parseInt(decimal[1]);
    
    if (jiao === 0 && fen === 0) {
      result += '整';
    } else {
      if (jiao > 0) result += digits[jiao] + '角';
      if (fen > 0) result += digits[fen] + '分';
    }
    if(amount < 1) {result = `佰万 拾万 万 仟 佰 拾 元 ${result}`}
    else if(amount <10) {result = `佰万 拾万 万 仟 佰 ${result}`}
    else if(amount <100) {result = `佰万 拾万 万 仟 ${result}`}
    else if(amount <1000) {result = `佰万 拾万 万 ${result}`}
    else if(amount <10000) {result = `佰万 拾万 ${result}`}
    else if(amount <100000) {result = `佰万  ${result}`}
    
    return result;
  }

  module.exports = simpleAmountToChinese